﻿/*----------------------------------------------------------------
// Copyright (C) 2013 苏州麦迪斯顿医疗科技股份有限公司
// 文件名：AuditTraceCallHandlerAttribute.cs
// 文件功能描述：AuditTraceCallHandlerAttribute
// 创建标识：顾伟伟-2014-04-03
----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity.InterceptionExtension;
using Microsoft.Practices.Unity;

namespace CPOE.Framework.Auditing
{
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property |
        AttributeTargets.Method | AttributeTargets.Interface)]
    public class LightCallHandlerAttribute : HandlerAttribute
    {
        /// <summary>
        /// 模块名称
        /// </summary>
        public string ModuleName { get; set; }
        /// <summary>
        /// 组件名称
        /// </summary>
        public string ComponentName { get; set; }
        /// <summary>
        /// 方法名称
        /// </summary>
        public string MethodName { get; set; }

        public override ICallHandler CreateHandler(IUnityContainer container)
        {
            return new LightCallHandler(this.ModuleName, this.ComponentName, this.MethodName, this.Order);
        }
    }
}
